package com.gexiaobao.pigeon.app.model.bean

import android.os.Parcelable
import kotlinx.android.parcel.Parcelize

/**
 * @Author      : hxw
 * @Date        : 2023/6/20 9:32
 * @Describe    :
 */
@Parcelize
class ConfirmAnOrderResponse(

    var id: Int = 0,
    var orderStatus: Int = 0,//0--生成，1-支付中，2-支付成功，3-已发货 4-已签收 5-支付失败，6-退款中，7-退款成功，8-退款失败,9-订单关闭 10-已评价, 11-退货中 12-退货成功 13-退货失败）
    var expireTime: String = "",//失效时间
    var orderReceiver: String = "",
    var orderContactPhone: String = "",
    var orderAddress: String = "",
    var totalPrice: Double = 0.00,
    var finalPrice: Double = 0.00,
    var orderNo: String = "",
    var createdAt: String = "",
    val list: ArrayList<StoreInfoList> = arrayListOf(),
    var orderStatusLabel: String = "",
    var expressNo: String = "",
    var closeSecond: Long = 0,
    var discountPrice: Double = 0.00,
    var integralMoney: Double = 0.00,//鸽币抵扣的金额
    var discountTotalPrice: Double = 0.00,
    var isApply: Boolean = false,
    var gebiCnt: Int = 0,//可使用的gebi
    var canUseGebi: Int = 0,
    var gebiHas: Int = 0,//用户一共有多少鸽币
    var canCutMoney: Double = 0.00,//可抵扣多少钱
    var totalExpressFee: Double = 0.00,//运费
    var isRealName: Boolean = false,//是否实名
    var brandType: Int = 0,//1国产2进口
    var idCardNo: String = "",
    var idCardName: String = "",
    var hasIdCardPic: String = ""

) : Parcelable {

    /**
     * 数据是否为空
     */
    fun isEmpty() = list == null || (list as List<*>).isEmpty()

    @Parcelize
    class StoreInfoList(

        var shopId: Int = 0,
        var shopName: String = "",
        var shopOrderId: Int = 0,
        var shopExpressFee: Double = 0.00,
        var list: ArrayList<GoodsOrderList> = arrayListOf(),

        ) : Parcelable {

        /**
         * 数据是否为空
         */
        fun isEmpty() = list == null || (list as List<*>).isEmpty()

        @Parcelize
        class GoodsOrderList(

            var id: Int = 0,
            var goodId: Int = 0,
            var goodName: String = "",
            var specImg: String = "",
            var specName: String = "",
            var amount: Int = 0,
            var childOrderNo: String = "",
            var childOrderStatus: Int = 0,//0--生成，1-支付中，2-支付成功，3-已发货 4-已签收 5-支付失败，6-退款中，7-退款成功，8-退款失败,9-订单关闭 10-已评价, 11-退货中 12-退货成功 13-退货失败 14-退货审核中 15-审核通过）
            var salePrice: Double = 0.00,
            var expressFee: Double = 0.00

        ) : Parcelable

    }

}